<div id="main">
	<div id="main-column">
	<?php
	
	$table = '<form action="'.$_SERVER['PHP_SELF'].'" method="post" onsubmit="return conferma()">
	<table width="840" class="td0">
	<tr><td colspan="8"><a href="../admin/subscription.php">Nuovo Utente</a></td></tr>   
	<tr bgcolor="#99CCCC">
		<td width="90" class="td-3d" background="../images/bgino.png"><b>Utente</b></td>
		<td width="70" class="td-3d" background="../images/bgino.png" align="center"><b>Tipo</b></td>
		<td width="50" class="td-3d" background="../images/bgino.png" align="center"><b>Sex</b></td>
		<td width="110" class="td-3d" background="../images/bgino.png" align="center"><b>Nome</b></td>
		<td width="100" class="td-3d" background="../images/bgino.png" align="center"><b>Cognome</b></td>	
		<td width="80" class="td-3d" background="../images/bgino.png" align="center"><b>Telefono1</b></td>	
		<td width="60" class="td-3d" background="../images/bgino.png" align="center"><b>Attivo Amm.</b></td>	
		<td width="50" class="td-3d" background="../images/bgino.png" align="center"><b>Attivo</b></td>	
		<td width="60" class="td-3d" background="../images/bgino.png" align="center"><b>Confer.</b></td>	
		<td width="80" class="td-3d" background="../images/bgino.png" align="center"><b>Dt Registraz..</b></td>	
		<td width="80" class="td-3d" background="../images/bgino.png" align="center"><b>Dt Pubblicaz.</b></td>	
	</tr>';
	$count=0;
    while ($row = mysql_fetch_array($this->_res))
    {    
        $username = stripslashes($row['username']);
        $name = stripslashes($row['nome']);
        $cognome = stripslashes($row['cognome']);
		$user_id = $row['user_id'];
		$prefisso1 = $row['prefisso1'];
		$telefono1 = $row['telefono1'];
		$f_attivo = $row['f_attivo'];
		$f_attivo_admin = $row['f_attivo_admin'];
		$f_confermato = $row['f_confermato'];
		$sesso = $row['sesso'];
		if($row['regdate']!="")
			$regdate = date("j/m/Y", $row['regdate']);
		else
			$regdate = "";
		if($row['publicdate']!="")
			$publicdate = date("j/m/Y", $row['publicdate']);
		else
			$publicdate = "";
		if($row['tipo_utente']==USER_ADMIN)
		{
			$desc_utente = 'Admin';
		}
		else
		{
			$desc_utente = 'Utente';	
		}	
		
		$table .= '<tr bgcolor="'.(($count %2 == 0) ? '#dbdbdb' : '#c1c1c1').'">';
		$table .= '<td><a href="profile.php?id='.$user_id.'">'.$username.'</a></td>';
		$table .= '<td align="left">'.$desc_utente.'</td>';
		$table .= '<td align="center">'.$sesso.'</td>';
		$table .= '<td align="left">'.$name.'</td>';
		$table .= '<td align="left">'.$cognome.'</td>';	
		$table .= '<td align="left">'.$prefisso1.'.'.$telefono1.'</td>';	
		$table .= '<td align="center">'.$f_attivo_admin.'</td>';		
		$table .= '<td align="center">'.$f_attivo.'</td>';	
		$table .= '<td align="center">'.$f_confermato.'</td>';	
		$table .= '<td align="center">'.$regdate.'</td>';	
		$table .= '<td align="center">'.$publicdate.'</td>';	
		
		$table .= '</tr>';
		$count++;	
    }
    mysql_free_result($this->_res); 
	$table .= '</table></form>';   
	?>
<?=$table;?>
	</div>
</div>    